package cn.stylefeng.guns.modular.api.model.enums;


import cn.stylefeng.roses.kernel.model.exception.AbstractBaseExceptionEnum;

/**
   *
  * @Date 2018年07月08日18:39:47
 */
public enum StorageStatusEnum implements AbstractBaseExceptionEnum {

    IN(0, "入库"),
    OUT(1, "出库"),
    MOVE(2, "移库");

    StorageStatusEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
    public static String getDesc(Integer code) {
        if (code == null) {
            return "";
        } else {
            for (StorageStatusEnum s : StorageStatusEnum.values()) {
                if (s.getCode().equals(code)) {
                    return s.getMessage();
                }
            }
            return "";
        }
    }


    private Integer code;

    private String message;

    @Override
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
